package cn.org.cute.ebocy.util;

import java.text.DecimalFormat;
import java.text.ParseException;

/**
 * 时间格式处理类。
 */

public class StandNumberFormat {
	
    public static final String doubleClean = "####.##";
    public static final String double2Digit = "###0.00";
    public static final String integer = "####";

    public static double doubleCleanParse(String str){
    	try{
    		DecimalFormat df = new DecimalFormat(doubleClean);
    	
    	return df.parse(str).doubleValue();
    	}
    	catch(ParseException e){
    		return 0;
    	}
    	
    }
    public static String doubleCleanFormat(double num){
    	
    	DecimalFormat df = new DecimalFormat(doubleClean);
    	
    	return df.format(num);
    	
    }

}
